package com.qqtech.qquan.mall.model;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.qquan.mall.enums.MallConst;

@SuppressWarnings("serial")
public class MallCategoryVo extends MallCategory{
	/**
	 * 类目总价格
	 */
	private BigDecimal total;
	/** 前台 选中 1是2否 */
	private String selected;
	
	public String getSelected() {
		if (selected == null) {
			selected = "2";
		}
		return selected;
	}

	public void setSelected(String selected) {
		this.selected = selected;
	}

	public String getPathAdImg() {
		if (StringUtil.isBlank(this.getAdImg())) {
			return "";
		}
		return this.getImgHandleDomain() + this.getAdImg() + MallConst.IMG_CATEGORY_BANNER;
	}
	
	public BigDecimal getTotal() {
		return total;
	}
	public void setTotal(BigDecimal total) {
		this.total = total;
	}
	public String getPathImg() {
		if (StringUtil.isBlank(this.getImg())) {
			return "";
		}
		return super.getFileDomain()+""+this.getImg();
	}
	
	public List<MallProductVo> productList;
	
	public List<MallProductVo> getProductList() {
		return productList;
	}
	public void setProductList(List<MallProductVo> productList) {
		this.productList = productList;
	}
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
}